From: Florian Müllner Date: Sun, 3 Oct 2010 02:16:07 +0000 (+0200) Subject: tests: Fix environment X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9681 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b33ebb450a693137c0f8eb859d2c244b1320709b;p=gnome-shell.git tests: Fix environment Environment.init() uses Shell.Global, which is not accessible outside the mutter process; allowing to run the function when window.global is undefined fixes the environment for tests. https://bugzilla.gnome.org/show_bug.cgi?id=631091 --- diff --git a/js/ui/environment.js b/js/ui/environment.js index 6bab8300e..82ecea148 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -83,6 +83,9 @@ function init() { return St.describe_actor(this); }; + if (window.global === undefined) // test environment + return; + _blockMethod('Clutter.Event.get_state', 'Shell.get_event_state', 'gjs\'s handling of Clutter.ModifierType is broken. See bug 597292.'); _blockMethod('Gdk.Display.get_device_state', 'global.get_pointer',